package kevin.framework.basic.common.xls;

import org.apache.poi.hssf.usermodel.HSSFFont;
import org.apache.poi.hssf.util.HSSFColor;

/**
 * @ClassName: CustomCellStyle
 * @Description: 自定义单元格格式，仅控制字体【大小、颜色、字体类型、粗细】、单元格【背景色、边框色】
 * @author kevin.huang
 * @date 2016-1-22 下午5:49:13
 */
public class CustomCellStyle {

	/**
	 * @Fields fontHeightInPoints : 字体大小
	 */
	public short fontHeightInPoints = 10;

	/**
	 * @Fields fontColor : 字体颜色，默认取值：HSSFColor.BLACK.index
	 */
	public short fontColor = HSSFColor.BLACK.index;

	/**
	 * @Fields fontName : 字体
	 */
	public String fontName = "Courier New";

	/**
	 * @Fields fontWeight : 粗细，默认 取值：HSSFFont.BOLDWEIGHT_NORMAL
	 */
	public short fontWeight = HSSFFont.BOLDWEIGHT_NORMAL;

	/**
	 * @Fields cellBackground :单元格背景色，默认取值：HSSFColor.WHITE.index
	 */
	public short cellBackground = HSSFColor.WHITE.index;

	/**
	 * 数据格式 如 "0.00";如 "yyyy-MM-dd hh:mm:ss" ,默认不设置
	 ***/
	public String dataFormat = "";

	@Override
	public String toString() {
		return this.fontName + String.valueOf(this.fontColor) + String.valueOf(this.fontHeightInPoints)
				+ String.valueOf(this.fontWeight) + String.valueOf(this.cellBackground) + dataFormat;
	}

}
